let MyArray = {
    sum:(...args) =>  {
        return args.reduce((item,next) => item + next);
    }
}

let res = MyArray.sum(1,2,3,4,5);
console.log(res);